<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:87:"F:\phpStudy_NEW\PHPTutorial\WWW\public/../application/index\view\index\publication.html";i:1521784551;s:73:"F:\phpStudy_NEW\PHPTutorial\WWW\application\index\view\public\header.html";i:1521189289;s:70:"F:\phpStudy_NEW\PHPTutorial\WWW\application\index\view\public\nav.html";i:1530521179;s:73:"F:\phpStudy_NEW\PHPTutorial\WWW\application\index\view\public\footer.html";i:1520580169;}*/ ?>
<!-- 页眉 -->
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="referrer" content="always">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
	<title>国外文献数据库检索系统</title>
	<link rel="stylesheet" href="/static/layui/css/layui.css">
	<script src="/static/layui/layui.js"></script>
	<!--[if lt IE 9]>
	<script src="/static/ie8/html5.min.js"></script>
	<script src="/static/ie8/respond.min.js"></script>
	<![endif]-->
	<style>
		body{overflow-y: scroll;}
	</style>
</head>
<body>

<!-- 导航 -->
<ul class="layui-nav">
  <li class="layui-nav-item <?php if($type == 'ALL'): ?>layui-this<?php endif; ?>"><a href="/">首页</a></li>
  <li class="layui-nav-item <?php if($type == 'J'): ?>layui-this<?php endif; ?>"><a href="<?php echo url('index/journal'); ?>">期刊文献</a></li>
  <li class="layui-nav-item <?php if($type == 'C'): ?>layui-this<?php endif; ?>"><a href="<?php echo url('index/conference'); ?>">会议文献</a></li>
  <li class="layui-nav-item <?php if($type == 'R'): ?>layui-this<?php endif; ?>"><a href="<?php echo url('index/report'); ?>">科技报告</a></li>
  <li class="layui-nav-item <?php if($type == 'D'): ?>layui-this<?php endif; ?>"><a href="<?php echo url('index/dissertation'); ?>">学位论文</a></li>
  <li class="layui-nav-item">
    <a href="javascript:;">其他分类</a>
    <dl class="layui-nav-child"> <!-- 二级菜单 -->
      <dd><a href="<?php echo url('index/compile'); ?>">汇编文献</a></dd>
      <dd><a href="<?php echo url('index/standard'); ?>">技术标准</a></dd>
      <dd><a href="<?php echo url('index/patent'); ?>">专利文献</a></dd>
      <dd><a href="<?php echo url('index/monograph'); ?>">专著文献</a></dd>
      <dd><a href="<?php echo url('index/tool'); ?>">参考工具</a></dd>
    </dl>
  </li>
  <li class="layui-nav-item">
    <a href="javascript:;">文摘数据</a>
    <dl class="layui-nav-child"> <!-- 二级菜单 -->
      <dd><a href="<?php echo url('index/ntis'); ?>">NTIS</a></dd>
      <dd><a href="<?php echo url('index/inspec'); ?>">INSPEC</a></dd>
      <dd><a href="<?php echo url('index/ei'); ?>">EI</a></dd>
      <dd><a href="<?php echo url('index/aero'); ?>">AERO</a></dd>
      <dd><a href="<?php echo url('index/kjwz'); ?>">科技文摘</a></dd>
    </dl>
  </li>
  <li class="layui-nav-item <?php if($type == 'CA'): ?>layui-this<?php endif; ?>"><a href="<?php echo url('index/catalog'); ?>">分库检索</a></li>
</ul>

<ul class="layui-nav layui-layout-right">
  <li class="layui-nav-item">
    <a href="">控制台<span class="layui-badge">8</span></a>
  </li>
  <li class="layui-nav-item">
    <a href="">个人中心<span class="layui-badge-dot"></span></a>
  </li>
  <li class="layui-nav-item" lay-unselect="">
    <a href="javascript:;"><img src="..." class="layui-nav-img">我</a>
    <dl class="layui-nav-child">
      <dd><a href="javascript:;">修改信息</a></dd>
      <dd><a href="javascript:;">安全管理</a></dd>
      <dd><a href="javascript:;">退了</a></dd>
    </dl>
  </li>
</ul>




<!-- 主体 -->
<div class="layui-fluid" id="main">
    <div class="layui-row" style="margin-top: 20px">
        <div class="layui-col-md2" style="max-width: 130px;min-width: 130px; margin-right: 20px;">
            <img src="/static/img/logo_a.png" style="border: 0px;">
        </div>
        <div class="layui-col-md10">
            <form class="layui-form" action="">
                <div class="layui-form-item">
                    <div class="layui-input-inline" style="width: 500px">
                        <input name="keyword" id="keyword" lay-verify="keyword" autocomplete="off" placeholder="请输入搜索关键词，普通检索不要输入特殊符号，如: '&'、'^'、'|' 等" class="layui-input" type="text">
                    </div>
                    <div class="layui-input-inline">
                        <button class="layui-btn" lay-submit="" lay-filter="searchButton">搜一下</button>
                    </div>
                </div>
            </form>
        </div>
        <hr>
    </div>

    <div class="layui-row" style="margin-top: 20px">
        <div class="layui-col-md12">
            <blockquote class="layui-elem-quote">本次搜索到相关结果 <span id="counts"></span> 种，用时：<span id="times"></span>（秒）</blockquote>
            <div class="layui-row">
                <div class="layui-col-md12">
                    <table class="layui-hide" lay-filter="dataTable" id="dataTable"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="listTpl">
    <a href="<?php echo url('index/publicationList'); ?>?type=<?php echo $type; ?>&pid={{d.s_id}}" target="_blank">{{ d.sourcename }}</a>
</script>

<!-- 控制脚本 -->
<script>
    layui.use(['element', 'layer', 'form', 'table'], function(){
        var element = layui.element
            ,form = layui.form
            ,table = layui.table
            ,layer = layui.layer
            ,$ = layui.$;

        var layer_index = layer.load(0,{time: 10*1000});

        //自定义验证规则
        form.verify({
            keyword: function(value){
                if(value.length < 3){
                    return '亲，关键词太少了，多输2个字符再试试';
                }
            }
        });

        var tableIns = table.render({
            elem: '#dataTable'
            ,where: {
                keyword: $('#keyword').val()
                ,type:  '<?php echo $type; ?>'
            }
            ,url: '/api/search/publication'
            ,method: 'post'
            ,page: true
            ,skin: 'nob'
            ,loading: true
            ,limit:10
            ,cols: [[
                {field:'sourcename', title:'母体文献名称', templet: '#listTpl'}
            ]]
            , done: function(res, curr, count){
                layer.close(layer_index);
                $('#times').html(res.times);
                //得到数据总量
                $('#counts').html(count);
            }
        });

        //监听提交
        form.on('submit(searchButton)', function(data){
            layer_index = layer.load();
            tableIns.reload({
                where: {
                    keyword: $('#keyword').val()
                    ,type:  '<?php echo $type; ?>'
                }
                ,page: {
                    curr: 1 //重新从第 1 页开始
                }
            });
            return false;
        });

    });
</script>

<!-- 页脚 -->
</body>
</html>